<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <!-- Compiled and minified CSS -->
    <link rel="stylesheet" href="./materialize.min.css">
    <!-- Compiled and minified JavaScript -->
    <script src="./materialize.min.js"></script>
    <title>Test</title>
</head>

<body>

    <div style="border:1px dashed #000; padding: 10px;">

        基本逻辑测试：

        <p>
            <input type="button" value="H5调用ArkTs" onclick="h5CallArkTs();" />
        </p>

        <p>
            <input type="button" value="ArkTs调用H5" onclick="ArkTsCallH5()" />
        </p>

    </div>


</body>

<script src="./base64.js"></script>

<!-- 以下是网页中的调用方法 -->
<script>

    function h5CallArkTs() {
        
        var str = callBackToApp.callbackOne(); //js调用ets方法，实现ets访问
    }

    function ArkTsCallH5() {
        var str = callBackToApp.callbackTwo(); //js调用ets方法，实现ets访问
    }

    function ArkTsCallH5Alter() {

        alert("原生调用到了H5");
        console.log("原生调用到了H5");
        h5CallArkTs();
    }

</script>

</html>